﻿<Window x:Class="TestVisioCanvas.Dialogs.NewPageDialog"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="NewPageDialog" Height="300" Width="300">
    <Grid Margin="8 8 0 0">
        <Grid.RowDefinitions>
            <RowDefinition Height=".3*"/>
            <RowDefinition Height=".3*"/>
            <RowDefinition Height=".4*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="0.35*" />
            <ColumnDefinition Width="0.35*" />
            <ColumnDefinition Width="0.3*" />
        </Grid.ColumnDefinitions>

        <TextBlock Text="Nome" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" FontSize="16"/>
        <TextBox Name="_TB_translX" Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" VerticalAlignment="Center" FontSize="16"
            Text="{Binding PageName, Mode=TwoWay}"/>        

        <TextBlock Text="Copia da" Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" FontSize="16"/>
        <ComboBox Name="_TB_translY" Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" VerticalAlignment="Center" FontSize="16"
            Text="{Binding TraslationY, Mode=TwoWay}"
            ItemsSource="{Binding Pages}">
            <ComboBox.ItemTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding Name}" FontSize="18"/>
                </DataTemplate>
            </ComboBox.ItemTemplate>
        </ComboBox>

        <Grid Grid.Row="2" Grid.ColumnSpan="3">
            <Grid.RowDefinitions>
                <RowDefinition Height=".4*"/>
                <RowDefinition Height=".6*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0.3*"/>
                <ColumnDefinition Width="0.35*"/>
                <ColumnDefinition Width="0.35*"/>
            </Grid.ColumnDefinitions>

            <CheckBox Grid.Row="0" Grid.ColumnSpan="3" Content="Copia da pagina esistete" FontSize="14"
                Name="_CopyFromCB" IsChecked="{Binding CopyFrom, Mode=TwoWay}"/>

            <Button Name="bt_OK" Grid.Row="1" Grid.Column="1" FontSize="16" 
                Width="{Binding ElementName=bt_Cancel, Path=Width}" 
                IsDefault="True" Content="OK" VerticalAlignment="Center" Click="bt_OK_Click"/>

            <Button Name="bt_Cancel" Grid.Row="1" Width="80" FontSize="16" Grid.Column="2" IsCancel="True"
                Content="Cancel" VerticalAlignment="Center" Click="bt_Cancel_Click"/>
        </Grid>

    </Grid>
</Window>
